/*
 * acm1926.c
 *
 *  Created on: 8 Apr 2010
 *      Author: xuxu
 */

#include<stdio.h>
#include<string.h>
int main()
{
	int num,l,r;
	int bo;
	char str1[1024],str2[1024];
	l=0;
	r=999999999;
	while(1)
	{
		scanf("%d",&num);
		if(0==num)
			break;
		scanf("%s%s",str1,str2);
		if(0==strcmp(str2,"low"))
		{
			if(num>l)
				l=num;
		}
		else if(0==strcmp(str2,"high"))
		{
			if(num<r)
				r=num;
		}
		else
		{
			if(num>l&&num<r)
				printf("Stan may be honest\n");
			else
				printf("Stan is dishonest\n");
			l=0;
			r=999999999;
		}
	}
	return 0;
}
